/**
 * This file is part of XaMauLo 
 * File :                       SchemaXML.scala
 * Author's email :             laure.conte@gmail.com
 *                              sophie.couillez@gmail.com
 **/


package objects;
import scala.xml._;
import scala._;
import scala.collection.mutable.HashMap;

/**
  *This class defines an Element of the XML files
 */

class Element(nomBal:String, container:String, lesFils:List[String], lesParents:List[String],attributs : HashMap[String,String],lig:int,colum:int) {

  val nameBalise:String = nomBal
  var sons:List[String] = lesFils
  var parents:List[String] = lesParents
  val contain:String = container
  val atts : HashMap[String,String]=attributs
  val ligne : int=lig
  val column : int=colum
  //add an element in the list of sons
  def addSon(son:String):Unit = {
    sons=son :: sons
  }
  
  //add an element in the list of parents
  def addParent(dad:String):Unit = {
    parents=dad :: parents
  }
}


